$(function () {
    $.ajaxPrefilter(function (option) {
        // console.log(option.url);
        option.url = 'http://www.liulongbin.top:3008' + option.url

        if (option.url.indexOf('/my/')!=-1) {
            option.headers = {
                Authorization: localStorage.getItem('token') || ''
            }
        }
        option.complete= function (res) {
            // console.log(res);
            if (res.responseJSON.code===1 && res.responseJSON.message ==='身份认证失败！') {
                location.href = '/login.html'
                localStorage.removeItem('token')
                console.log(res);
            }
        }

    })











})